def on_press(event, card_frame):
    global dragged_card, drag_data
    dragged_card = card_frame
    drag_data["x"] = event.x
    drag_data["y"] = event.y
    card_frame.lift()  # 将当前卡片提升到最上层